'''
Created on 2009-4-17

@author: Administrator
'''
import unittest
from com.carnation.common.util.test import testTools


class Test(unittest.TestCase):


    def testCreate(self):
        test = testTools(__file__) 
        rsp_msg = test.requestAndRsp(1, 'Run For Test MRelationService.create', \
'''
MRelationService.create
    MOIMRelation
        setName    "relationName"
        setDisplayName    "displayName"
        setSourceModelId    "Model=1"
        setTargetModelId    "Model=2"
        setRelationTypeId    "RelationType=1"
''', \
'''
MOIMRelation
    getId    -
    getName    "relationName"
    getDisplayName    "displayName"
    getDescription    null
    getSourceModelId    "Model=1"
    getTargetModelId    "Model=2"
    getRelationTypeId    "RelationType=1"
    getLimitation    null
'''
)
#    print rsp_msg
        print '\nDone'
        test.quit()


if __name__ == "__main__":
    unittest.main()
